home *** CD-ROM | disk | FTP | other *** search
- Path: stc06.ctd.ornl.gov!mbk
- From: mbk@jt3ws1.etd.ornl.gov (Kennel)
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Subject: type checking in C++ was Re: Hungarian notation
- Followup-To: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Date: 10 Jan 1996 23:45:43 GMT
- Organization: Oak Ridge National Lab, Oak Ridge, TN
- Message-ID: <4d1j37$ge8@stc06.ctd.ornl.gov>
- References: <4cf8hf$8fe@hopi.gate.net> <DKoBrn.CHs@falcon.daytonoh.attgis.com>
- Reply-To: kennel@msr.epm.ornl.gov
- NNTP-Posting-Host: jt3ws1.etd.ornl.gov
- X-Newsreader: TIN [version 1.2 PL2]
-
- Dick Menninger (Dick.Menninger@DaytonOH.ATTGIS.COM) wrote:
- > Imbedding type information in a name had some utility
- > in the older C environments with the weak type checking
- > and very poor tools (no way to click on a variable and
- > find out the minutae of its implementation). Even there,
- > a price was paid that required C lexical recognizing
- > translation (old name to new name) tools to ease evolution
- > messes that resulted. The imbedding of type information
- > in variable names is really a poor substitute for good
- > documentation and tools.
-
- > The purpose of C++ in its design
- > and evolution has been to hide implementation while
- > providing genuinely heavy duty compile-time type checking.
-
-
- Is the goal actually achieved? "heavy duty compile-time type-checking?"
-
- At one point something like this could be a problem. It it still?
-
- function(Type *p) {
-
- // One of this may silently crash or do bad things. Both typecheck.
-
- // delete p;
- // delete [] p;
-
- }
-
- The response is "but that isn't a type error" is an attempt to
- define away the real problem, which is that pointers to single objects
- and references to built-in arrays of value objects are not always distinct
- types, in contrast to other currently existing languages which do
- "heavier duty compile-time typechecking".
-
- Taking such an argument to absurd limits one could argue that Smalltalk does
- heavy-duty compile-time type-checking, but all programs pass type-checking
- automatically because there is but one compile-time type for variables.
-
- cheerio
- matt
-
-
- > Good Day
- > Dick
- > Dick.Menninger@DaytonOH.ATTGIS.COM
-
-